﻿using Sasc.PV.BLL;
using Sasc.PV.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sasc.PV.Web.Admin.SystemManage
{
    public partial class SystemJiaoSeView : PVAdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //加载节点进入CheCkBoxList中
                PublicMethod.AddItmesInCheCKList(this.QuanxianCheckBoxList);

                ERPJiaoSe MyModel = new ERPJiaoSe();
                MyModel = MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
                this.JiaoSeNameLabel.Text = MyModel.JiaoSeName;
                this.JiaoSeDescriptionLabel.Text = MyModel.BackInfo;
                PublicMethod.GetCheckList(this.QuanxianCheckBoxList, MyModel.QuanXian);

                //写系统日志
                WriteRiZhi("用户查看角色信息(" + this.JiaoSeNameLabel.Text + ")");

                for (int i = 0; i < this.QuanxianCheckBoxList.Items.Count; i++)
                {
                    if (this.QuanxianCheckBoxList.Items[i].Text.Trim() == "")
                    {
                        this.QuanxianCheckBoxList.Items[i].Enabled = false;
                        this.QuanxianCheckBoxList.Items[i].Attributes.CssStyle.Add("DISPLAY", "none");
                    }
                }
            }

        }
    }
}